<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>奥莱官方线上商城</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body { font-family: -apple-system, sans-serif; padding: 20px; text-align: center; }
        .btn { background: #07C160; color: white; padding: 12px 24px; border-radius: 6px; display: inline-block; margin: 15px; text-decoration: none; }
        .manual { color: #888; margin-top: 30px; font-size: 14px; }
        .steps { text-align: left; display: inline-block; margin: 10px auto; }
        
        /* 新增顶部提示条样式 */
        .wechat-alert {
            position: fixed;
            top: -60px;
            left: 0;
            width: calc( 100% - 15px );
            background: #fff8e5;
            color: #666;
            padding: 12px 15px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transition: top 0.3s ease;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 999;
        }
        .wechat-alert.show {
            top: 0;
        }
        .close-btn {
            color: #888;
            font-size: 24px;
            cursor: pointer;
            padding: 0 10px;
        }
    </style>
</head>
<body>
<!-- 新增顶部提示条 -->
<div id="wechatAlert" class="wechat-alert">
    <span>请点击右上角 ••• 选择「在浏览器打开」</span>
    <span class="close-btn" onclick="closeAlert()">&times;</span>
</div>

<h3>为保障访问体验</h3>
<p>请点击下方按钮在浏览器中打开</p>

<!-- 主跳转按钮 -->
<a id="jump-btn" class="btn">点击跳转浏览器</a>

<!-- 备用引导 -->
<div class="manual">
    <p>若无法跳转，请手动操作：</p>
    <div class="steps">
        <p>1. 点击右上角 <strong>•••</strong></p>
        <p>2. 选择「在浏览器打开」</p>
    </div>
</div>

<script>
    // 检测微信环境
    function isWechat() {
        return /MicroMessenger/i.test(navigator.userAgent)
    }

    // 关闭提示条
    function closeAlert() {
        document.getElementById('wechatAlert').classList.remove('show')
    }

    // 自动跳转逻辑
    setTimeout(function(){
        if (!isWechat()) {
            window.location.href = "https://app.mall.qingze88.cn"
        }
    }, 300)

    // 按钮点击处理
    document.getElementById('jump-btn').addEventListener('click', function(e) {
        if (isWechat()) {
            e.preventDefault()
            // 显示顶部提示条
            document.getElementById('wechatAlert').classList.add('show')
            // 5秒后自动隐藏
            setTimeout(closeAlert, 5000)
        } else {
            // 非微信环境直接跳转
            window.location.href = "https://app.mall.qingze88.cn"
        }
    })
</script>
</body>
</html>